package com.lu.article.feign;


import com.lu.api.article.IApArticleClient;
import com.lu.article.service.ApArticleIndexService;
import com.lu.model.article.dto.ArticleDto;
import com.lu.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ApArticleClientController implements IApArticleClient {

    @Autowired
    private ApArticleIndexService apArticleIndexService;

    /**
     *
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/article/save")
    @Override
    public ResponseResult saveArticle(ArticleDto dto) {
        return apArticleIndexService.saveArticle(dto);
    }
}
